<!DOCTYPE html>
<html lang="zh_CN">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
	<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.css" rel="stylesheet">
	<script src="https://cdn.bootcss.com/jquery/2.0.1/jquery.js"></script>	
	<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.js"></script>
	<title>首页</title>
</head>
<body>
	<!-- 导航 -->
	<nav class="navbar navbar-default" role="navigation">
		
		<div class="container-fluid">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span class="sr-only">我爱电影网</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button> <a class="navbar-brand" href="#">我爱电影网</a>
			</div>
			
			<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
				<ul class="nav navbar-nav">
					<li class="active">
						<a href="#">首页</a>
					</li>
					<li>
						<a href="#">热门</a>
					</li>
					<li class="dropdown">
						<a href="#" class="dropdown-toggle" data-toggle="dropdown">分类<strong class="caret"></strong></a>
						<ul class="dropdown-menu">
							<li>
								<a href="./list.html">动作</a>
							</li>
							<li>
								<a href="./list.html">爱情</a>
							</li>
							<li>
								<a href="./list.html">剧情</a>
							</li>
							<li class="divider">
							</li>
							<li>
								<a href="./list.html">科幻</a>
							</li>
							<li class="divider">
							</li>
							<li>
								<a href="./list.html">动漫</a>
							</li>
						</ul>
					</li>
				</ul>
				<form class="navbar-form navbar-left" role="search">
					<div class="form-group">
						<input type="text" class="form-control" />
					</div> <button type="submit" class="btn btn-default">搜索</button>
				</form>
				<ul class="nav navbar-nav navbar-right">
					<li>
						<a href="./register.html">注册</a>
					</li>
					
					<li>
						<a href="./login.html">登录</a>
					</li>
					
				</ul>
			</div>
		</div>
		
	</nav>

	<!-- 巨幕 -->
	<div class="container">
			<div class="row clearfix">
					<div class="col-md-12 column">
						<div class="jumbotron">
							<h1>
								我爱电影网
							</h1>
							<p>
								我爱电影网,涵盖最新电影、好看的电影、经典电影、电影推荐、免费电影、高清电影在线观看及海量最新电影图文视频资讯,看电影就上电影网dy.com。
							</p>
							<p>
								 <a class="btn btn-primary btn-large" href="#">查看更多</a>
							</p>
						</div>
					</div>
				</div>
	</div>
	<hr>

	<!-- 主要区域  -->
	<div class="container">
		<div class="row clearfix">
			<div class="col-md-8 column">
				<div class="row" id="movieContainer">

				</div>

				<ul class="pagination">
					<li>
							<a href="javascript:;">上一页</a>
					</li>
					<li>
							<a href="javascript:;">1</a>
					</li>
					<li>
							<a href="javascript:;">2</a>
					</li>
					<li>
							<a href="javascript:;">3</a>
					</li>
					<li>
							<a href="javascript:;">4</a>
					</li>
					<li>
							<a href="javascript:;">5</a>
					</li>
					<li>
							<a href="javascript:;">下一页</a>
					</li>
				</ul>
			</div>
			<div class="col-md-4 column">
				<div class="panel panel-success">
					  <div class="panel-heading">
							<h3 class="panel-title">最新电影</h3>
					  </div>
					  <div class="panel-body">
							<ul class="list-group">
									<li class="list-group-item"><a href="#">哪吒魔童降世</a></li>
									<li class="list-group-item"><a href="#">哪吒魔童降世</a></li>
									<li class="list-group-item"><a href="#">哪吒魔童降世</a></li>
									<li class="list-group-item"><a href="#">哪吒魔童降世</a></li>
									<li class="list-group-item"><a href="#">哪吒魔童降世</a></li>
									<li class="list-group-item"><a href="#">哪吒魔童降世</a></li>
									<li class="list-group-item"><a href="#">哪吒魔童降世</a></li>
									<li class="list-group-item"><a href="#">哪吒魔童降世</a></li>
								</ul>
					  </div>
				</div>

				<div class="panel panel-danger">
					  <div class="panel-heading">
							<h3 class="panel-title">热门电影</h3>
					  </div>
					  <div class="panel-body">
							<ul class="list-group">
									<li class="list-group-item"><a href="#">哪吒魔童降世</a></li>
									<li class="list-group-item"><a href="#">哪吒魔童降世</a></li>
									<li class="list-group-item"><a href="#">哪吒魔童降世</a></li>
									<li class="list-group-item"><a href="#">哪吒魔童降世</a></li>
									<li class="list-group-item"><a href="#">哪吒魔童降世</a></li>
									<li class="list-group-item"><a href="#">哪吒魔童降世</a></li>
									<li class="list-group-item"><a href="#">哪吒魔童降世</a></li>
									<li class="list-group-item"><a href="#">哪吒魔童降世</a></li>
									
									<li class="list-group-item"><a href="#">哪吒魔童降世</a></li>
									<li class="list-group-item"><a href="#">哪吒魔童降世</a></li>
									

								</ul>
					  </div>
				</div>

			</div>
		</div>
	</div>
	
	<hr>

	<!-- 底部分类 -->
	<div class="container">
		<div class="row clearfix">
			<div class="col-md-12 column">
				<div class="row clearfix">
					<div class="col-md-3 column">
						<blockquote>
							<p>
								> 专注于电影资源的传播

							</p>
						</blockquote>
					</div>
					<div class="col-md-6 column">
						<div class="row clearfix">
							<div class="col-md-4 column">
								<h4>常见问题</h4>
								<ul>
									<li>
										<a href="javascript:;">如何获取最新的电影资源？</a>
									</li>
									<li>
											<a href="javascript:;">如何购买VIP</a>
									</li>
								</ul>
							</div>
							<div class="col-md-4 column">
								<h4>帮助于反馈</h4>
								<ul>
									<li>
										<a href="javascript:;">如何找回密码？</a>
									</li>
									<li>
										<a href="javascript:;">手机号码如何登陆？</a>
									</li>
									
								</ul>
							</div>
							<div class="col-md-4 column">
								<h4>关于</h4>
								<ul>
									<li>
										<a href="javascript:;">发展历程</a>
									</li>
								</ul>
							</div>
						</div>
					</div>
					<div class="col-md-3 column">
						<img alt="140x140" src="./public/imgs/qr.jpg" />
					</div>
				</div>
			</div>
		</div>
	</div>

	<hr>

	<!-- 顶部版权 -->
	<div class="container">
		<div class="row clearfix">
				<div class="col-md-8 column">
					<blockquote>
						<p>
							CopyRight &copy; 2019 我爱开发网官方网站
						</p> <small>专注于电影资源的传播  <a href="http://www.beian.miit.gov.cn">粤ICP备xx21114号</a></small>
					</blockquote>
				</div>
				
		</div>		
	</div>
</body>
<script src="https://cdn.bootcss.com/jquery/2.0.1/jquery.js"></script>
<script type="text/javascript">

    function getMovieList(){
        let movieLstUrl = "http://localhost:6060/api/v1/movie/lst";
        $.ajax({
            url:movieLstUrl,
            type:'GET',
            dataType:'json',
            success:function(json){
                console.log(json);
                if(json.error_code == 0 ){
                    var html = ``;
                    json.result.data.forEach((val,index) => {
                        html += `
                        <div class="col-md-4">
                            <div class="thumbnail">
                                <img width="150" src="${val.imgUrl}" />
                                <div class="caption">
                                    <h3>
                                        ${val.movieName}
                                    </h3>
                                    <p>
                                        ${val.markup}...
                                    </p>
                                    <p>
                                            <a class="btn btn-primary" href="#">详情</a>
                                    </p>
                                </div>
                            </div>
                        </div>`;
                    });
                    $("#movieContainer").html( html );
                }else{
                    alert('获取失败');
                    return;
                }
            }
        });
    }
    getMovieList();
        
</script>
</body>
</html>